<div id="top-panel">
    <div id="panel">
        <ul>
            <li><a href="<?php echo site_url("country/create"); ?>" class="report">Create</a></li>            	
        </ul>
    </div>
</div>
<div id="wrapper">
	<div id="content">
		<div id="rightnow">
			<h3 class="reallynow">Country list</h3>
			<div class="search_wrap">			
				<?php echo form_open('country/search', array('class'=>'form_search')) ?>
				Search: <input type="text" name="search_text" id="search_text" class="input" value="<?php echo isset($search_text) ? $search_text : ''; ?>" />
			</div>
			<?php if (count($country)): ?>
			<table width="100%">
				<thead>
					<tr>
						<th>Code</th>
						<th>Country</th>
						<th>Num. Code</th>
						<th>City list</th>						
						<th>Task</th>					
					</tr>
				</thead>
				<tbody>
					<?php foreach($country as $v): ?>
					<tr>
						<td><div style="padding-left:5px;"><a class="tool" href="<?php echo site_url("country/edit/".$v['iso']); ?>"><?php echo $v['iso']; ?></a></div></td>
						<td><?php echo $v['name']; ?></td>
						<td><?php echo $v['numcode']; ?></td>
						<td><div align="center"><a class="tool" href="<?php echo site_url("city/filter/".$v['iso']); ?>">List cities</a></div></td>						
						<td><div align="center"><a class="tool" href="<?php echo site_url("country/delete/".$v['iso']); ?>">Delete</a></div></td>
					</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
			<div id="pager">
				<?php echo $this->pagination->create_links(); ?>
			</div>
			<?php else: ?>
				<p>No data to display</p>
			<?php endif; ?>
		</div>
	</div>
</div>